#!/usr/bin/env sh

set -e

if [ -d ".git" ]
then
    git checkout ${params.branch}
fi

../echoMessage.sh  "正在生成模版项目，"

rm -fr .git

git init
git add .
git commit -m 'first commit'

tar -zcvf simpleCodeQuiz.zip ./*

curl -X POST \
    -F "file=@simpleCodeQuiz.zip" \
    $callback_url/templateProject